<!--  -->
<template>
  <div class="addTypeBox">
    <div class="selectType">
      <div class="typeBox governmentOrder" :class="reportState.type === 'order' ? 'addBorder' : ''" @click="onSetType('order')">
        <div class="orderImg">
          <img src="@/assets/report_order_icon.png" alt />
        </div>
        <p class="name">普通订单报备</p>
        <p class="tips">*支持EXCLE批量导入、线上填写、勾选妥了网自营店SKU</p>
      </div>
      <div class="typeBox governmentOrder" :class="reportState.type === 'biding' ? 'addBorder' : ''" @click="onSetType('biding')">
        <div class="orderImg">
          <img src="@/assets/report_biding_icon.png" alt />
        </div>
        <p class="name">竞价订单报备</p>
        <p class="tips">*支持EXCLE批量导入、线上填写</p>
      </div>
    </div>
  </div>
</template>

<script>
import { defineComponent } from '@vue/composition-api'
import { useReport } from '@/hooks/report'
export default defineComponent({
  setup () {
    const { reportState, onSetType, reportReset } = useReport()
    reportReset()
    return {
      reportState,
      onSetType,
    }
  },
})
</script>
<style lang='scss' scoped>
.addTypeBox {
  padding: 0 40px;
  .selectType {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
    .typeBox {
      flex: 1;
      height: 350px;
      max-width: 320px;
      border: 1px solid #aaa;
      border-radius: 5px;
      position: relative;
      cursor: pointer;
      padding: 0 10px;
      .orderImg {
        // width: 160px;
        height: 122px;
        margin: 60px auto 27px auto;
        text-align: center;
        img {
          // width: 100%;
          height: 100%;
        }
      }
      .name {
        text-align: center;
        font-size: 15px;
        font-weight: bold;
      }
      .tips {
        width: 200px;
        // height: 36px;
        margin: 36px auto;
        color: #e51c23;
        font-size: 12px;
        line-height: 18px;
      }
      .maskModule {
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        position: absolute;
        top: 0;
        left: 0;
        z-index: 3;
      }
      .el-icon-lock {
        color: #fff;
        line-height: 350px;
        text-align: center;
        font-size: 104px;
      }
    }
    .governmentOrder {
      margin-right: 20px;
    }
    .addBorder {
      border-color: $--color-primary;
      box-shadow: 0px 0px 3px $--color-primary inset;
    }
  }
}
</style>
